<template>
	<div>
		<!-- 时间 -->
		<timehead></timehead>
		
		<div v-if="this.user!=null">
			<!-- 我的资料 -->
			<my></my>
			
			<!-- 我的订单 -->
			<myorder></myorder>
		</div>
		
		<div v-else>
			<router-link to="/login">登录</router-link>
		</div>
		
		<!-- tablebar -->
		<tabletar class="tablebar"></tabletar>
	</div>
</template>

<script>
	import timehead from '@/components/timehead.vue'
	import tabletar from '@/components/home/tablebar.vue'
	import my from '@/components/mine/my.vue'
	import myorder from '@/components/mine/myorder.vue'
	export default
	{
		data()
		{
			return{
				user:{}
			}
		},
		components:
		{
			timehead,
			tabletar,
			my,
			myorder
		},
		created()
		{
			this.user=localStorage.getItem('username')
		}
	}
</script>

<style>
	
</style>
